import { Layout } from "@/router";
import { MockMethod } from "vite-plugin-mock";
const url = "/dev-api/api/v1/menus/routes";
const method = "get";
const data = {
  code: "00000",
  data: [
    {
      path: "/dashboard",
      component: "Layout",
      meta: {
        title: "首页",
        icon: "homepage",
        hidden: false,
        roles: ["ADMIN"],
        keepAlive: true,
      },
    },
    {
      path: "/TM_Info",
      component: "Layout",
      meta: {
        title: "基础功能",
        icon: "api",
        hidden: false,
        roles: ["ADMIN"],
        keepAlive: true,
      },
      children: [
        {
          path: "TM_Info",
          component: "pages/TM_Info",
          name: "TM_Info",
          meta: {
            title: "遥测信息",
            icon: "dict",
            hidden: false,
            roles: ["ADMIN"],
            keepAlive: true,
          },
        },
      ],
    },
    {
      path: "/apply",
      component: "Layout",
      meta: {
        title: "应用流程",
        // icon: "api",
        hidden: false,
        roles: ["ADMIN"],
        keepAlive: true,
      },
      children: [
        {
          path: "state_mon",
          component: "pages/apply/state_mon",
          name: "state_mon",
          meta: {
            title: "状态监测",
            icon: "dict",
            hidden: false,
            roles: ["ADMIN"],
            keepAlive: true,
          },
        },
        {
          path: "de_predic",
          component: "pages/apply/de_predic",
          name: "de_predic",
          meta: {
            title: "退化预测",
            icon: "dict",
            hidden: false,
            roles: ["ADMIN"],
            keepAlive: true,
          },
        },
      ],
    },

    {
      path: "/retrain",
      component: "Layout",
      meta: {
        title: "重训练流程",
        // icon: "api",
        hidden: false,
        roles: ["ADMIN"],
        keepAlive: true,
      },
      children: [
        {
          path: "incremental",
          component: "pages/retrain/incremental",
          name: "incremental",
          meta: {
            title: "增量学习",
            icon: "dict",
            hidden: false,
            roles: ["ADMIN"],
            keepAlive: true,
          },
        },
        {
          path: "transfer",
          component: "pages/retrain/transfer",
          name: "transfer",
          meta: {
            title: "迁移学习",
            icon: "dict",
            hidden: false,
            roles: ["ADMIN"],
            keepAlive: true,
          },
        },
      ],
    },

    {
      path: "/verify",
      component: "Layout",
      meta: {
        title: "指标验证",
        // icon: "api",
        hidden: false,
        roles: ["ADMIN"],
        keepAlive: true,
      },
      children: [
        {
          path: "state_recog",
          component: "pages/verify/state_recog",
          name: "state_recog",
          meta: {
            title: "状态识别",
            icon: "dict",
            hidden: false,
            roles: ["ADMIN"],
            keepAlive: true,
          },
        },
        {
          path: "fault_predic",
          component: "pages/verify/fault_predic",
          name: "fault_predic",
          meta: {
            title: "故障预测",
            icon: "dict",
            hidden: false,
            roles: ["ADMIN"],
            keepAlive: true,
          },
        },
      ],
    },
  ],
  msg: "一切ok",
};

export default [
  {
    url: url,
    method: method,
    response: () => {
      return data;
    },
  },
] as MockMethod[];
